<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
    Document   : about.xhtml
    Created on : April 1st 2014
    Author     : Ihab Ali
-->
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">    
    <body>
        
        
        <ui:composition template="./WEB-INF/templates/template.xhtml">
            
            <ui:define name="content">
              <h:form rendered="#{login.loggedIn == false}" >
                  <h2>#{messages.messageNotAuthintecated}</h2>
                <h:commandButton action="/index?faces-redirect=true"
                                 value="#{messages.loginLabel}" />
              </h:form>

                <h:form id="selectForm" rendered="#{login.loggedIn}">
                    <p:growl id="growl" showSummary="false"  sticky="true"  showDetail="true"/>
                    <p:layout id="mainContent" style="height: 100px; font-size: x-small">
                        <p:layoutUnit position="center" >
                          
                             <p:selectOneMenu   value="#{listControl.examModel.selectedExam}">
                                   <f:selectItems value="#{listControl.examModel.examStringList}" />
                             </p:selectOneMenu> 
                             <br></br>
                             <br></br>
                            <p:panelGrid columns="2">
                               
                                <p:commandButton value="#{messages.selectExamLabel}" update="selectForm" action="#{listControl.examSelectionListener()}"/>
                                <p:commandButton value=" #{messages.LogOut}"  action="#{listControl.logOut()}"/>
                            </p:panelGrid>
                            
                        </p:layoutUnit>
                    </p:layout>
                 </h:form>
            </ui:define>

        </ui:composition>
        
    </body>
</html>